const action = require("../action");


module.exports = {
    'GET /': async (ctx, next) => {
        let data = {
        }
        let hotServiceData = await action.service.getHotService();
        let hotStudioData = await action.studio.getHotStudio();
        ctx.render('main.html', {
            "ui": {
                "title": "求解--主页",
                "env": process.env.NODE_ENV,
                "hotClassTabs": [
                    {
                        "title": "建设开发",
                        "title2": "快速建站 软件开发",
                        "url": "/service-list?class=" + "web",
                        "pic": "/img/class/01.png"
                    },
                    {
                        "title": "视频图像",
                        "title2": "视频处理 Photoshop",
                        "url": "/service-list?class=" + "media",
                        "pic": "/img/class/02.png"                        
                    },
                    {
                        "title": "文案新闻",
                        "title2": "文案撰写 新闻推广",
                        "url": "/service-list?class=" + "text",
                        "pic": "/img/class/03.png"
                    },
                    {
                        "title": "更多",
                        "title2": " ",
                        "url": "/service-list?class=" + "all",
                        "pic": "/img/class/04.png"
                    },
                ]
                                
            },
            "services": hotServiceData.hotServices,
            "studios": hotStudioData.hotStudios

        });
    }
};

